<?php

include_once ('com/alibaba/openapi/client/entity/SDKDomain.class.php');
include_once ('com/alibaba/openapi/client/entity/ByteArray.class.php');
include_once ('AlibabaTradeFastCreateOrderParam/AlibabaTradeFastOffer.class.php');
include_once ('AlibabaTradeFastCreateOrderParam/AlibabaOceanOpenplatformBizTradeResultBizSimpleOrder.class.php');

class AlibabaTradeFastResult extends SDKDomain {

       	
    private $totalSuccessAmount;
    
        /**
    * @return 下单成功的订单总金额，单位：分
    */
        public function getTotalSuccessAmount() {
        return $this->totalSuccessAmount;
    }
    
    /**
     * 设置下单成功的订单总金额，单位：分     
     * @param Long $totalSuccessAmount     
     * 参数示例：<pre>1000</pre>     
     * 此参数必填     */
    public function setTotalSuccessAmount( $totalSuccessAmount) {
        $this->totalSuccessAmount = $totalSuccessAmount;
    }
    
        	
    private $orderId;
    
        /**
    * @return 下单成功后的订单id
    */
        public function getOrderId() {
        return $this->orderId;
    }
    
    /**
     * 设置下单成功后的订单id     
     * @param String $orderId     
     * 参数示例：<pre>60241415417789305</pre>     
     * 此参数必填     */
    public function setOrderId( $orderId) {
        $this->orderId = $orderId;
    }
    
        	
    private $postFee;
    
        /**
    * @return 下单成功时的原始运费，下单后卖家可调整，因此不等于最终支付运费
    */
        public function getPostFee() {
        return $this->postFee;
    }
    
    /**
     * 设置下单成功时的原始运费，下单后卖家可调整，因此不等于最终支付运费     
     * @param Long $postFee     
     * 参数示例：<pre>100</pre>     
     * 此参数必填     */
    public function setPostFee( $postFee) {
        $this->postFee = $postFee;
    }
    
        	
    private $failedOfferList;
    
        /**
    * @return 下单失败的商品信息
    */
        public function getFailedOfferList() {
        return $this->failedOfferList;
    }
    
    /**
     * 设置下单失败的商品信息     
     * @param array include @see AlibabaTradeFastOffer[] $failedOfferList     
     * 参数示例：<pre> </pre>     
     * 此参数必填     */
    public function setFailedOfferList(AlibabaTradeFastOffer $failedOfferList) {
        $this->failedOfferList = $failedOfferList;
    }
    
        	
    private $multiOrders;
    
        /**
    * @return 生成多笔订单时，由该模型返回
    */
        public function getMultiOrders() {
        return $this->multiOrders;
    }
    
    /**
     * 设置生成多笔订单时，由该模型返回     
     * @param array include @see AlibabaOceanOpenplatformBizTradeResultBizSimpleOrder[] $multiOrders     
     * 参数示例：<pre>[]</pre>     
     * 此参数必填     */
    public function setMultiOrders(AlibabaOceanOpenplatformBizTradeResultBizSimpleOrder $multiOrders) {
        $this->multiOrders = $multiOrders;
    }
    
    	
	private $stdResult;
	
	public function setStdResult($stdResult) {
		$this->stdResult = $stdResult;
					    			    			if (array_key_exists ( "totalSuccessAmount", $this->stdResult )) {
    				$this->totalSuccessAmount = $this->stdResult->{"totalSuccessAmount"};
    			}
    			    		    				    			    			if (array_key_exists ( "orderId", $this->stdResult )) {
    				$this->orderId = $this->stdResult->{"orderId"};
    			}
    			    		    				    			    			if (array_key_exists ( "postFee", $this->stdResult )) {
    				$this->postFee = $this->stdResult->{"postFee"};
    			}
    			    		    				    			    			if (array_key_exists ( "failedOfferList", $this->stdResult )) {
    			$failedOfferListResult=$this->stdResult->{"failedOfferList"};
    				$object = json_decode ( json_encode ( $failedOfferListResult ), true );
					$this->failedOfferList = array ();
					for($i = 0; $i < count ( $object ); $i ++) {
						$arrayobject = new ArrayObject ( $object [$i] );
						$AlibabaTradeFastOfferResult=new AlibabaTradeFastOffer();
						$AlibabaTradeFastOfferResult->setArrayResult($arrayobject );
						$this->failedOfferList [$i] = $AlibabaTradeFastOfferResult;
					}
    			}
    			    		    				    			    			if (array_key_exists ( "multiOrders", $this->stdResult )) {
    			$multiOrdersResult=$this->stdResult->{"multiOrders"};
    				$object = json_decode ( json_encode ( $multiOrdersResult ), true );
					$this->multiOrders = array ();
					for($i = 0; $i < count ( $object ); $i ++) {
						$arrayobject = new ArrayObject ( $object [$i] );
						$AlibabaOceanOpenplatformBizTradeResultBizSimpleOrderResult=new AlibabaOceanOpenplatformBizTradeResultBizSimpleOrder();
						$AlibabaOceanOpenplatformBizTradeResultBizSimpleOrderResult->setArrayResult($arrayobject );
						$this->multiOrders [$i] = $AlibabaOceanOpenplatformBizTradeResultBizSimpleOrderResult;
					}
    			}
    			    		    		}
	
	private $arrayResult;
	public function setArrayResult($arrayResult) {
		$this->arrayResult = $arrayResult;
				    		    			if (array_key_exists ( "totalSuccessAmount", $this->arrayResult )) {
    			$this->totalSuccessAmount = $arrayResult['totalSuccessAmount'];
    			}
    		    	    			    		    			if (array_key_exists ( "orderId", $this->arrayResult )) {
    			$this->orderId = $arrayResult['orderId'];
    			}
    		    	    			    		    			if (array_key_exists ( "postFee", $this->arrayResult )) {
    			$this->postFee = $arrayResult['postFee'];
    			}
    		    	    			    		    		if (array_key_exists ( "failedOfferList", $this->arrayResult )) {
    		$failedOfferListResult=$arrayResult['failedOfferList'];
    			$this->failedOfferList = new AlibabaTradeFastOffer();
    			$this->failedOfferList->setStdResult ( $failedOfferListResult);
    		}
    		    	    			    		    		if (array_key_exists ( "multiOrders", $this->arrayResult )) {
    		$multiOrdersResult=$arrayResult['multiOrders'];
    			$this->multiOrders = new AlibabaOceanOpenplatformBizTradeResultBizSimpleOrder();
    			$this->multiOrders->setStdResult ( $multiOrdersResult);
    		}
    		    	    		}
 
   
}
?>